package com.starpl.mobile.android.monthunsae.november.domain;

import java.io.Serializable;

import com.starpl.mobile.android.monthunsae.november.R;

/**
 * 캘린더의 하루 일자를 구성하는 데이터 도메인 클래스
 * 
 * @author 우연화
 * @since 2011.03.17
 */
public class DayInfo implements Serializable
{
	private static final long serialVersionUID = 1L;
	private final static int LOVE 		= 1;
	private final static int MONEY 		= 2;
	
	private boolean inMonth;
	private String date;
	private int icon;

	private int community;

	/**
	 * 기본 생성자
	 */
	public DayInfo()
	{
		super();
		
		this.inMonth = false;
	}

	/**
	 * 데이터 입력 생성자
	 * 
	 * @param monthUnsaeDay
	 * @param love
	 */
	public DayInfo(MonthUnsaeDay monthUnsaeDay, int community)
	{
		super();

		this.community = community;
		
		switch(this.community)
		{
		case LOVE :
			if(monthUnsaeDay.getLoveNum()>0)
			{
				icon = R.drawable.icon_love_good;
			}
			else if(monthUnsaeDay.getLoveNum()<0)
			{
				icon = R.drawable.icon_love_bad;
			}
			break;
			
		case MONEY :
			if(monthUnsaeDay.getMoneyNum()>0)
			{
				icon = R.drawable.icon_money_good;
			}
			else if(monthUnsaeDay.getMoneyNum()<0)
			{
				icon = R.drawable.icon_money_bad;
			}
			break;
		}
	}

	public boolean isInMonth()
	{
		return inMonth;
	}

	public void setInMonth(boolean inMonth)
	{
		this.inMonth = inMonth;
	}

	public String getDate()
	{
		return date;
	}

	public void setDate(String date)
	{
		this.date = date;
	}

	public int getIcon()
	{
		return icon;
	}

	public void setIcon(int icon)
	{
		this.icon = icon;
	}

	public int getCommunity()
	{
		return community;
	}

	public void setCommunity(int community)
	{
		this.community = community;
	}
}
